let isPalindrome = function (s) {
  s = s.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
  console.log(s)
  let start = 0, end = s.length - 1;
  
  while (start < end) {
    if (s[start] == s[end]) {
      start++;
      end--;
    } else {
      return false;
    }
  }
  return true;
};
let s = "0P";
console.log(isPalindrome(s))